import service from "../../utils/requst"

//优惠券列表
export function xlq_couponlist(payload = {}) {
    return service({
        url: '/coupon',
        params: payload,
        method: 'get'
    })
}
//优惠券新增
export function xlq_couponadd(payload = {}) {
    return service({
        url: '/coupon',
        data: payload,
        method: 'post'
    })
}
//优惠券删除
export function xlq_coupondelete(payload: any = {}) {
    return service({
        url: '/coupon/' + payload.id,
        data: payload,
        method: 'delete'
    })
}
//优惠券编辑
export function xlq_couponsave(payload: any = {}) {
    return service({
        url: '/coupon/' + payload.id,
        data: payload.data,
        method: 'put'
    })
}
//优惠券下线
export function xlq_couponxiaxian(payload: any = {}) {
    return service({
        url: '/coupon/' + payload.id,
        data: payload.data,
        method: 'PATCH'
    })
}